<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>
    
    // const s = new Set([2,2,3,3,4,5]);
    // console.log(s);
    // console.log(typeof s);
    // console.log(s.length)
    // console.log(s[0])
    // for(let i in s){
    //     console.log(i)
    // }
    // for(let i of s){
    //     console.log(i)
    // }
    // console.log(...s);
    // let arr = [1,2,3,4,5,4,3,2,1,1,1];
    // arr = [...new Set(arr)];
    // console.log(arr);
    
    // s.add("hello");
    // console.log(s);

    // console.log(s.keys())
    // console.log(s.values())


    // set其实也是一种map



    const m = new Map();
    console.log(m);
    console.log(typeof m);
    m.set("name","admin");
    m.set("age",18);
    console.log(m);
    console.log(m.get("name"));
    console.log(m.get("age"));

    for(let i of m){
        console.log(i);
    }

    console.log(m.keys());

    for(let i of m.keys()){
        console.log(i);
    }

    console.log(m.values());

    for(let i of m.values()){
        console.log(i);
    }




</script>
</html>